import Vue from 'vue'
import App from './App.vue'
// 使用Vue路由
import vueRouter from "vue-router"
Vue.use(vueRouter)
import router from "./router/index"
// 所用Elementui
import Elementui from "element-ui"
import "element-ui/lib/theme-chalk/index.css"
Vue.use(Elementui)


/*
*解决路由切换时更改标题
*/
router.beforeEach((to, from, next) => {
  /* 路由发生变化修改页面title */
  if (to.meta.title) {
    document.title = to.meta.title
  }
  next()
})

Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App),
}).$mount('#app')
